<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>11.16.JS对象-内置对象-截取数组</title>
    <script>
        // 截取数组
        var arr = [1, 2, 3, 4, 5];

        console.log(arr.slice(2));
        // ["3", "4", "5"]

        console.log(arr.slice(2, 4));
        // ["3", "4"]

        console.log(arr.slice(1, 5));
        // ["2", "3", "4", "5"]

    </script>
</head>

<body>

</body>

</html>